package com.dyp.jpa.repository;

import com.dyp.jpa.entity.Comment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface CommentDao extends JpaRepository<Comment, Integer> {

//    @Modifying
//    @Query("delete from Comment c where c.id=:id ")
//    void deleteByIdMy(@Param("id") Integer id);
//
//    @Query("select c from Comment c where c.id=:id ")
//    List<Comment> getBySId(@Param("id") Integer id);
}
